
#ifndef _IS61LV25616AL_H_
#define _IS61LV25616AL_H_

#define EXMC_D0_3_GROUP                 GPIOD
#define EXMC_D0_PIN                     GPIO_PIN_14
#define EXMC_D1_PIN                     GPIO_PIN_15
#define EXMC_D2_PIN                     GPIO_PIN_0
#define EXMC_D3_PIN                     GPIO_PIN_1

#define EXMC_D4_12_GROUP                GPIOE
#define EXMC_D4_PIN                     GPIO_PIN_7
#define EXMC_D5_PIN                     GPIO_PIN_8
#define EXMC_D6_PIN                     GPIO_PIN_9
#define EXMC_D7_PIN                     GPIO_PIN_10
#define EXMC_D8_PIN                     GPIO_PIN_11
#define EXMC_D9_PIN                     GPIO_PIN_12
#define EXMC_D10_PIN                    GPIO_PIN_13
#define EXMC_D11_PIN                    GPIO_PIN_14
#define EXMC_D12_PIN                    GPIO_PIN_15

#define EXMC_D13_15_GROUP               GPIOD
#define EXMC_D13_PIN                    GPIO_PIN_8
#define EXMC_D14_PIN                    GPIO_PIN_9
#define EXMC_D15_PIN                    GPIO_PIN_10

#define EXMC_A0_9_GROUP                 GPIOF
#define EXMC_A0_PIN                     GPIO_PIN_0
#define EXMC_A1_PIN                     GPIO_PIN_1
#define EXMC_A2_PIN                     GPIO_PIN_2
#define EXMC_A3_PIN                     GPIO_PIN_3
#define EXMC_A4_PIN                     GPIO_PIN_4
#define EXMC_A5_PIN                     GPIO_PIN_5
#define EXMC_A6_PIN                     GPIO_PIN_12
#define EXMC_A7_PIN                     GPIO_PIN_13
#define EXMC_A8_PIN                     GPIO_PIN_14
#define EXMC_A9_PIN                     GPIO_PIN_15

#define EXMC_A10_15_GROUP               GPIOG
#define EXMC_A10_PIN                    GPIO_PIN_0
#define EXMC_A11_PIN                    GPIO_PIN_1
#define EXMC_A12_PIN                    GPIO_PIN_2
#define EXMC_A13_PIN                    GPIO_PIN_3
#define EXMC_A14_PIN                    GPIO_PIN_4
#define EXMC_A15_PIN                    GPIO_PIN_5

#define EXMC_A16_18_GROUP               GPIOD
#define EXMC_A16_PIN                    GPIO_PIN_11
#define EXMC_A17_PIN                    GPIO_PIN_12
#define EXMC_A18_PIN                    GPIO_PIN_13

#define EXMC_NIORD_GROUP                GPIOF
#define EXMC_NIORD_PIN                  GPIO_PIN_6

#define EXMC_NREG_GROUP                 GPIOF
#define EXMC_NREG_PIN                   GPIO_PIN_7

#define EXMC_NIOWR_GROUP                GPIOF
#define EXMC_NIOWR_PIN                  GPIO_PIN_8

#define EXMC_CD_GROUP                   GPIOF
#define EXMC_CD_PIN                     GPIO_PIN_9

#define EXMC_INTR_GROUP                 GPIOF
#define EXMC_INTR_PIN                   GPIO_PIN_10

#define EXMC_NIOS16_GROUP               GPIOF
#define EXMC_NIOS16_PIN                 GPIO_PIN_11

#define EXMC_INT2_GROUP                 GPIOG
#define EXMC_INT2_PIN                   GPIO_PIN_6

#define EXMC_INT3_GROUP                 GPIOG
#define EXMC_INT3_PIN                   GPIO_PIN_7

#define EXMC_CLK_GROUP                  GPIOD
#define EXMC_CLK_PIN                    GPIO_PIN_3

#define EXMC_NOE_GROUP                  GPIOD
#define EXMC_NOE_PIN                    GPIO_PIN_4

#define EXMC_NWE_GROUP                  GPIOD
#define EXMC_NWE_PIN                    GPIO_PIN_5

#define EXMC_NWAIT_GROUP                GPIOD
#define EXMC_NWAIT_PIN                  GPIO_PIN_6

#define EXMC_NE1_GROUP                  GPIOD
#define EXMC_NE1_PIN                    GPIO_PIN_7

#define EXMC_NE2_GROUP                  GPIOG
#define EXMC_NE2_PIN                    GPIO_PIN_9

#define EXMC_NE3_GROUP                  GPIOG
#define EXMC_NE3_PIN                    GPIO_PIN_10

#define EXMC_NE4_GROUP                  GPIOG
#define EXMC_NE4_PIN                    GPIO_PIN_12

#define EXMC_NBL0_GROUP                 GPIOE
#define EXMC_NBL0_PIN                   GPIO_PIN_0

#define EXMC_NBL1_GROUP                 GPIOE
#define EXMC_NBL1_PIN                   GPIO_PIN_1

#define EXMC_BANK0_NORSRAM_REGION0_ADDR (uint32_t)(0x60000000)
#define EXMC_BANK0_NORSRAM_REGION1_ADDR (uint32_t)(0x64000000)
#define EXMC_BANK0_NORSRAM_REGION2_ADDR (uint32_t)(0x68000000)
#define EXMC_BANK0_NORSRAM_REGION3_ADDR (uint32_t)(0x6C000000)

#define EXMC_SRAM0_SIZE                 (uint32_t)(64 * 1024) /* 64KB */

int sram_is61lv256_init(void);

#endif